package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.EpmBlacklist;
import com.ruoyi.system.domain.EpmInformation;
import com.ruoyi.system.mapper.EpmBlacklistMapper;
import com.ruoyi.system.service.IEpmBlacklistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EpmBlacklistServiceImpl implements IEpmBlacklistService {
    @Autowired
    private EpmBlacklistMapper epmBlacklistMapper;
    public List<EpmBlacklist> list(EpmBlacklist epmBlacklist){
        return epmBlacklistMapper.list(epmBlacklist);
    }

    public void insert(EpmBlacklist epmBlacklist){
         epmBlacklistMapper.insert(epmBlacklist);
    }

    public void delete(Integer blackListId) {
        epmBlacklistMapper.delete(blackListId);
    }

    public void update(EpmBlacklist epmBlacklist){
        epmBlacklistMapper.update(epmBlacklist);
    }

//    判断用户是否存在于黑名单中
    public Boolean checkName(String name){
        if(epmBlacklistMapper.checkName(name)!=null){
            return true;
        }

        return false;



    }

    public Boolean checkIdCard(String idCard){
       if(epmBlacklistMapper.checkIdCard(idCard)!=null){
           return true;
       }

        return false;
    }

    public Boolean checkNameAndIdCard(String name, String idCard){
       return epmBlacklistMapper.checkNameAndIdCard(name,idCard);
    }
}
